﻿@using asMeishi.web.Classes;
@using asMeishi.web.Models;
@using publicLibrary;
@{

    ViewBag.Title = "Main";
}
<style>
ul{ list-style-type:none; padding:0px; margin:0px;}
.topList li img{ float:left}
.topList li{ clear:both}
.topList .headPic{ max-height:80px; max-width:120px}
.recommandTopBox li{ margin:2px !important;}
</style>
<div>
    <div style="background:#eeeeee; border:1px solid #dedede; margin-bottom:10px; margin-top:10px;">
        <img src="@(baseConfig.siteThemePath)images/main_sign.gif" title="太多的想法，太少的动作" />
    </div>

    <div style="width:493px;float:left;">

        @Html.Action("getRandomRecommendShop","sitePublic")

        <div class="clearFloat"></div>

        <div class="foodStyleList topChannelList"  style="overflow:hidden; height:80px; width:100%;">
            <div class="title">食场分类</div>
            <div class="channelLine"></div>
            @(dictClass.get("shopClass").SplitToHTMLbyCode("<a href='/shop/shopSift?parameter=foodStyleList:_varA_'>_varB_</a>"))
        </div>

        <div class="topChannelList ">
            <div class="title">最热食场</div>
            <div class="channelLine"></div>
            <div class="content" style="font-size:12px">
                <ul>
                    @Html.Action("getHotShop", "sitePublic")
                </ul>
            </div>
        </div>

    </div>

    <div style="margin:0px 8px; border-left:1px dotted #d0d0d0;height:520px; width:0px; overflow:hidden; float:left"></div>

    <div style=" margin-left:510px;" >

        @Html.Action("getRandomRecommendFood","sitePublic")

        <div class="foodStyleList topChannelList" style="overflow:hidden; height:80px; width:100%; margin-top:8px;">
            <div class="title">最新变更菜肴</div>
            <div class="channelLine"></div>
                <ul  class="content">
                    @Html.Action("getTopFood", "sitePublic")
                </ul>

        </div>
        <div class="topChannelList">
            <div class="title">最热菜肴</div>
            <div class="channelLine"></div>
            <ul class="content" style="font-size:12px">

                     @Html.Action("getHotFood", "sitePublic" )

            </ul>
        </div>
        <div class="clearFloat"></div>

    </div>

</div>



<div class="topChannelList">
    <div class="title">新到食场</div>
                <div class="channelLine"></div>
        <ul class="content " style=" font-size:12px; margin:auto">
            @Html.Action("getTopShop2", "sitePublic", new { num=7})
        </ul>

</div>

<div style=" padding:10px; text-align:center; margin:8px 0px; color:#fff;" class="sbcolor">历史考试选择题:黄花岗起义第一枪谁开的？A宋教仁B孙中山C黄兴D徐锡麟,考生选C。又看第二题:黄花岗起义第二枪谁开的？考生傻了，就选了个B。接着第三题,黄花岗起义中，第三枪谁开的？考生疯了,胡乱选了A。考试出来就去找出卷老师。老师拿出课本说:黄兴连开三枪,揭开了黄花岗起义的序幕。</div>


            <div class="channelLine"></div>
<div id="homeTopInfo">
        <ul style=" border-right:1px dotted #d0d0d0;">
            <li class="title">最新就餐点评</li>
            @Html.Action("getTopComment", "sitePublic", new { num = 4 })
            <div class="clearFloat"></div>
        </ul>
        <ul style=" border-right:1px dotted #d0d0d0;">
            <li class="title">最新食场印象</li>
            @Html.Action("getTopImpressByShop", "sitePublic")
        </ul>
        <ul>
            <li class="title">最新菜肴点评</li>
            @Html.Action("getTopImpressByFood", "sitePublic")
        </ul>





</div>
<div class="clearFloat" />
<script>
    //随机动作
    (function randomRecommandMovie(t, q) {
        var n = q.length;
        var x = Math.floor(Math.random() * n);

        q.eq(x).animate({},100, openRecommandTopBox).delay(3000).delay(3000).animate({}, 100, closeRecommandTopBox);
        setTimeout(function () { return randomRecommandMovie(t, q) }, 7000)
    })(4000, $(".recommandTopBox a"))

    var openRecommandTopBox = function () {

        var _t = $(this);
        var _h = _t.find(".headPic").height();
        if (_t.attr("open") == "true") { return; }
        _t.attr("open", "true");
        _t.animate({ "margin-top": 43 - _h }, 300, function () { _t.attr("open", "false"); });
    }
    var closeRecommandTopBox = function () {
        var _t = $(this);
        if (_t.attr("close") == "true") { return; }
        _t.attr("close", "true");
        var _h = _t.find(".headPic").height();
        _t.animate({ "margin-top": -_h * 0.1 }, 300, function () { _t.attr("close", "false"); });    
    }
    $(".recommandTopBox a").hover(openRecommandTopBox, closeRecommandTopBox)

    

    

</script>